﻿using System.ServiceModel;
using Gpf.Whs.YouTubeDownloader.AddIn.CommSrv;

namespace Gpf.Whs.YouTubeDownloader.AddIn
{
    public static class CommSrvHelper
    {
        public static YouTubeDownloaderCommSrvClient GetClient()
        {
            var binding = new WSHttpBinding();
            binding.AllowCookies = false;
            binding.Name = "WSHttpBinding_IYouTubeDownloaderCommSrv";
            var epa = new EndpointAddress("http://localhost:8732/YouTubeDownloader/Service1/");

            return new YouTubeDownloaderCommSrvClient(binding, epa);
        }
    }
}